package com.openvas.service.impl;

import java.util.List;

import com.openvas.mapper.TableFilterMapper;
import com.openvas.service.ITableFilterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.openvas.domain.TableFilter;

import com.openvas.commons.common.core.text.Convert;

/**
 * 过滤器Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableFilterServiceImpl implements ITableFilterService
{
    @Autowired
    private TableFilterMapper tableFilterMapper;

    /**
     * 查询过滤器
     * 
     * @param filterId 过滤器主键
     * @return 过滤器
     */
    @Override
    public TableFilter selectTableFilterByFilterId(String filterId)
    {
        return tableFilterMapper.selectTableFilterByFilterId(filterId);
    }

    /**
     * 查询过滤器列表
     * 
     * @param tableFilter 过滤器
     * @return 过滤器
     */
    @Override
    public List<TableFilter> selectTableFilterList(TableFilter tableFilter)
    {
        return tableFilterMapper.selectTableFilterList(tableFilter);
    }

    /**
     * 新增过滤器
     * 
     * @param tableFilter 过滤器
     * @return 结果
     */
    @Override
    public int insertTableFilter(TableFilter tableFilter)
    {
        return tableFilterMapper.insertTableFilter(tableFilter);
    }

    /**
     * 修改过滤器
     * 
     * @param tableFilter 过滤器
     * @return 结果
     */
    @Override
    public int updateTableFilter(TableFilter tableFilter)
    {
        return tableFilterMapper.updateTableFilter(tableFilter);
    }

    /**
     * 批量删除过滤器
     * 
     * @param filterIds 需要删除的过滤器主键
     * @return 结果
     */
    @Override
    public int deleteTableFilterByFilterIds(String filterIds)
    {
        return tableFilterMapper.deleteTableFilterByFilterIds(Convert.toStrArray(filterIds));
    }

    /**
     * 删除过滤器信息
     * 
     * @param filterId 过滤器主键
     * @return 结果
     */
    @Override
    public int deleteTableFilterByFilterId(String filterId)
    {
        return tableFilterMapper.deleteTableFilterByFilterId(filterId);
    }
}
